package org.socialresume.client.mvp.presenter;


import org.enunes.gwt.mvp.client.EventBus;
import org.enunes.gwt.mvp.client.presenter.BasePresenter;
import org.socialresume.client.model.Feed;
import org.socialresume.client.mvp.presenter.MenuPresenter.Display;

import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.inject.Inject;

public class MenuPresenterImpl extends BasePresenter<Display> implements MenuPresenter {
	
	@Inject
	public MenuPresenterImpl(EventBus eventBus, Display display) {
		super(eventBus, display);
		bind();
	}
	
	@Override
	public void bind() {
		super.bind();
		display.getHasFeedSelectHandlers().addSelectionHandler(new SelectionHandler<Feed>() {
			@Override
			public void onSelection(SelectionEvent<Feed> event) {
				eventBus.fireEvent(event);
			}
		});
	}

	@Override
	public void addFeed(Feed feed) {
	}
}
